Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix!: exclude clutter from the component API #167

Merged
merged 15 commits into from
Dec 11, 2023

Conversation

tomivirkki
Copy link
Member

@tomivirkki tomivirkki commented Dec 8, 2023

Description

Omit unnecessary parts of HTMLElement interface from all Vaadin React components. This will eliminate clutter from the component public API including properties such as parentElement, offsetHeight, and appendChild.

Before:
Screenshot 2023-12-08 at 12 19 57

After:
Screenshot 2023-12-08 at 12 20 47

Also, ControllerMixinClass properties (addController and removeController) are manually excluded.

Part of #161

Fixes #137
Fixes #150
Fixes #165

Type of change

Refactor

@codecov-commenter
Copy link

codecov-commenter commented Dec 8, 2023

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (82b10ef) 98.21% compared to head (ff18dba) 98.21%.

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #167   +/-   ##
=======================================
  Coverage   98.21%   98.21%           
=======================================
  Files          25       25           
  Lines         168      168           
  Branches       16       16           
=======================================
  Hits          165      165           
  Misses          1        1           
  Partials        2        2           
Flag Coverage Δ
unittests 98.21% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@tomivirkki tomivirkki marked this pull request as draft December 8, 2023 10:29
@tomivirkki tomivirkki marked this pull request as ready for review December 8, 2023 15:18
web-padawan
web-padawan previously approved these changes Dec 11, 2023
Copy link
Member

@web-padawan web-padawan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. Confirmed that this makes JSDoc work in VSCode.

test/typings/api.ts Outdated Show resolved Hide resolved
@tomivirkki
Copy link
Member Author

Confirmed that this PR also fixes #150

Screenshot 2023-12-11 at 12 06 44

@tomivirkki tomivirkki changed the title refactor!: exclude clutter from the component API fix!: exclude clutter from the component API Dec 11, 2023
@tomivirkki tomivirkki merged commit 55f0f56 into main Dec 11, 2023
1 check passed
@tomivirkki tomivirkki deleted the refactor/omit-html-element-props branch December 11, 2023 12:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
3 participants